# $Id: PKGBUILD 70648 2012-05-13 19:17:24Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=wgetpaste
pkgver=2.20
pkgrel=1
pkgdesc="A script that automates pasting to a number of pastebin services"
url="http://wgetpaste.zlin.dk/"
arch=('any')
license=('custom')
depends=('wget')
optdepends=('xclip: interface to Xclipboard')
source=("http://wgetpaste.zlin.dk/$pkgname-$pkgver.tar.bz2"
        "http://wgetpaste.zlin.dk/$pkgname.example")
sha256sums=('7a53836d02e07cefc3c2978bb129a037fa1e1222ba0e275c4e818230a6d6fb9e'
            'cbc0437f7e04d95ffd224011ee2a056a84dfd7143e314e6962688295f68def4d')

package() {
  cd ${srcdir}/${pkgname}-${pkgver}

  install -D -m755 ${pkgname} ${pkgdir}/usr/bin/${pkgname}
  install -D -m644 _${pkgname} $pkgdir/usr/share/zsh/site-functions/_${pkgname}
  install -D -m644 ${srcdir}/${pkgname}.example ${pkgdir}/usr/share/${pkgname}/${pkgname}.example

# license
  sed -n '2,5p' wgetpaste > LICENSE
  install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
}
